package com.assistant;

import com.yungee.util.HttpClientUtils;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;

import java.util.*;

@Slf4j
public class BatchFlushData {
    public static void main1(String[] args) throws InterruptedException {
        String url = "/trusteeship/house/voiceTransform/generateHouseVoiceWordByIdRange";
        Long startId = 2076825L;
        Long endId = 2078825L;
        for (int i=1;i<=100;i++){
            Map<String,String> map = Maps.newHashMap();
            map.put("cityCode"," ");
            map.put("startId",String.valueOf(startId));
            map.put("endId",String.valueOf(endId));
            String result = HttpClientUtils.post(url, map);
            log.info("执行完第{}个，startId={},endId={}",i,startId,endId);
            Thread.sleep(180000L);
            if (endId.longValue()>2084610l){
                return;
            }
            startId = startId+2000L;
            endId = endId+2000L;
        }
    }

    public static void main(String[] args) {
        List<String> list = Arrays.asList( "banana","apple", "orange");
        Collections.sort(list, new Comparator<String>() {
            public int compare(String s1, String s2) {
                return s1.compareTo(s2);
            }
        });
        System.out.println(list);
    }
}
